package part20_职责链模式_学校采购审批;

/**
 * @ClassName: CollegeApprover
 * @Author: AllenSun
 * @Date: 2020/3/9 22:34
 */
public class ViceSchoolMasterApprover extends Approver {
    public ViceSchoolMasterApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest purchaseRequest) {
        if(purchaseRequest.getPrice()>10000&&purchaseRequest.getPrice()<=30000){
            System.out.println("请求编号id="+purchaseRequest.getId()+"被"+this.name+"处理");

        } else {
            approver.processRequest(purchaseRequest);
        }
    }
}
